package com.gitee.cliveyuan.tools;

import java.util.Random;

/**
 * 数学相关工具
 *
 * @author clive
 * Created on 2018/07/24
 * @since 1.0
 */
public class MathTools {

    private MathTools(){}

    public static int randomInt(int min, int max) {
        if (min == max) return min;
        Assert.isTrue(min < max, "min must great than max");
        Random random = new Random();
        return random.nextInt(max) % (max - min + 1) + min;
    }


}
